package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IMenuDAO;
import org.jsbd.boss.domian.Menu;

import edu.hziee.common.dbroute.BaseDAO;

public class MenuDAOImpl extends BaseDAO implements IMenuDAO {

  @Override
  public List<?> selectMenuTreeList(Menu form) throws Exception {
    return super.queryForList("oz_menu.select_oz_model_page_list", form);
  }

  @SuppressWarnings("unchecked")
  @Override
  public List<Menu> selectMenus(Menu form) throws Exception {
    return (List<Menu>) super.queryForList("oz_menu.select_oz_model_list", form);
  }

  @Override
  public Menu queryMenu(Menu form) {
    return (Menu) super.queryForObject("oz_menu.select_oz_model", form);
  }

  @Override
  public int updateMenu(Menu form) {
    return super.update("oz_menu.update_oz_model", form);
  }

  @Override
  public int insertMenu(Menu form) {
    int id = (Integer) super.insert("oz_menu.insert_oz_model", form);
    return id;
  }

}
